<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c"%>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>基础档案资料详情</title>
<jsp:include page="../../import.jsp" flush="true" />
</head>
<body>
        <form id="friBaseInfo_detail_form">
            <div class="fieldset1 tabel_col tabel_col_s clearFix ">
			<div class="fieldBox col_100">
				<div class="label">权证名称：</div>
				<div class="field">
					<span name="warrNm" id="warrNm" ></span>
				</div>
			</div>
			<div class="fieldBox col_100">
				<div class="label">权证类别：</div>
				<div class="field">
					<span name="warrTypeCd" id="warrTypeCd" ></span>
				</div>
			</div>
			<div class="fieldBox col_100">
				<div class="label">权证级别：</div>
				<div class="field">
					<span name="warrLv" id="warrLv" ></span>
				</div>
			</div>
			<div class="fieldBox col_100">
				<div class="label">客户类型：</div>
				<div class="field">
					<span name="custTypeCd" id="custTypeCd" ></span>
				</div>
			</div>
			<div class="fieldBox col_100">
				<div class="label">婚姻状况：</div>
				<div class="field">
					<span name=warStsCd id="warStsCd" ></span>
				</div>
			</div>
			<!-- hide data -->
			<div class="fieldBox col_100" style="display:none;">
				<div class="field">
					<input name="dataId" id="dataId" type="text" class="ui-textbox" value="${id}">
				</div>
			</div>
		</div>
        </form>
	<script>
		$(function() {
	       initData();
		});
		
		//父级窗口会调用取消
		frameElement.dialog.onCancel = function () {
			frameElement.dialog.close();
		}
		
		function initData(){
			var dataId = $("#dataId").val();
	    	if(!dataId)return;
	    	var _url = '<%=path%>/basic/archivesinfo/getById.do';
	    	AjaxUtils.ajaxPost(_url, {id:dataId}, callback);
    	}
		
		//新增回调
		function callback(msg){
			if(msg.success == 1){
				 setData(msg.data);//设置数据
			 }else{
				 UIUtils.alertError(msg.info);
			 }
		}
		
		//设置页面数据
	    function setData(data){
	    	$("#warrNm").html(data.warrNm);
	    	$("#warrTypeCd").html(data.warrTypeNM);
	    	$("#warrLv").html(data.warrLvNM);
	    	$("#custTypeCd").html(data.custTypeNM);
	    	$("#warStsCd").html(data.warStsNM);
		}
		
	</script>
</body>
</html>